import akshare as ak

stock_financial_abstract_df = ak.stock_financial_abstract(symbol="002202")
print(stock_financial_abstract_df)


stock_financial_analysis_indicator_df = ak.stock_financial_analysis_indicator(
    symbol="002202", start_year="2024"
)
print(stock_financial_analysis_indicator_df)


stock_financial_analysis_indicator_ths = ak.stock_financial_abstract_ths(
    symbol="002202"
)
print(stock_financial_analysis_indicator_ths)


def get_hs300_stock_codes():
    """
    获取沪深300股票代码列表
    :return:
    """
    hs300 = ak.index_stock_cons_sina("000300")
    codes = hs300["code"]
    codes = codes.tolist()
    return codes
